package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.utils.SecurityUtils;
import com.ruoyi.system.mapper.QyEnterpriseProductionTypeMapper;
import com.ruoyi.system.domain.QyEnterpriseProductionType;
import com.ruoyi.system.service.IQyEnterpriseProductionTypeService;

/**
 * 生产类型Service业务层处理
 *
 * @author yy
 * @date 2021-12-15
 */
@Service
public class QyEnterpriseProductionTypeServiceImpl implements IQyEnterpriseProductionTypeService {
    @Autowired
    private QyEnterpriseProductionTypeMapper qyEnterpriseProductionTypeMapper;

    /**
     * 查询生产类型
     *
     * @param id 生产类型ID
     * @return 生产类型
     */
    @Override
    public QyEnterpriseProductionType selectQyEnterpriseProductionTypeById(Long id) {
        return qyEnterpriseProductionTypeMapper.selectQyEnterpriseProductionTypeById(id);
    }

    /**
     * 查询生产类型列表
     *
     * @param qyEnterpriseProductionType 生产类型
     * @return 生产类型
     */
    @Override
    public List<QyEnterpriseProductionType> selectQyEnterpriseProductionTypeList(QyEnterpriseProductionType qyEnterpriseProductionType) {
        return qyEnterpriseProductionTypeMapper.selectQyEnterpriseProductionTypeList(qyEnterpriseProductionType);
    }

    /**
     * 新增生产类型
     *
     * @param qyEnterpriseProductionType 生产类型
     * @return 结果
     */
    @Override
    public int insertQyEnterpriseProductionType(QyEnterpriseProductionType qyEnterpriseProductionType) {
        return qyEnterpriseProductionTypeMapper.insertQyEnterpriseProductionType(qyEnterpriseProductionType);
    }

    /**
     * 修改生产类型
     *
     * @param qyEnterpriseProductionType 生产类型
     * @return 结果
     */
    @Override
    public int updateQyEnterpriseProductionType(QyEnterpriseProductionType qyEnterpriseProductionType) {
        return qyEnterpriseProductionTypeMapper.updateQyEnterpriseProductionType(qyEnterpriseProductionType);
    }

    /**
     * 批量删除生产类型
     *
     * @param ids 需要删除的生产类型ID
     * @return 结果
     */
    @Override
    public int deleteQyEnterpriseProductionTypeByIds(Long[] ids) {
        return qyEnterpriseProductionTypeMapper.deleteQyEnterpriseProductionTypeByIds(ids);
    }

    /**
     * 删除生产类型信息
     *
     * @param id 生产类型ID
     * @return 结果
     */
    @Override
    public int deleteQyEnterpriseProductionTypeById(Long id) {
        return qyEnterpriseProductionTypeMapper.deleteQyEnterpriseProductionTypeById(id);
    }
}
